package com.lingyuan.oms.handler.extend;

import com.lingyuan.oms.constant.OrderConstant;
import com.lingyuan.oms.domain.param.CreateOrderParam;
import com.lingyuan.oms.handler.AbstractHandler;
import com.lingyuan.oms.handler.Handler;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

/**
 * @ClassName：AddressHandler
 * @Author: LeiHao
 * @Date: 2024/10/7 19:54
 * @Description: 校验地址是否正确
 */
@Component("addressHandler")
public class AddressHandler extends AbstractHandler {
    @Override
    public boolean handle(CreateOrderParam param){
        if (param.getAddressId() == null || param.getAddressId() <= 0) {
            return false;
        }

        return super.handle(param);
    }
}
